package com.youi.entity;

import java.util.Date;

import com.youi.common.DelStatus;

import java.sql.*;


import java.io.Serializable;


/**
 * 用户微信信息
 * @author XJY
 */
public class Userwechat implements Serializable {

	private Long id;							//ID
	private Date gmtCreated;					//创建时间
	private Integer delStatus;					//删除状态（0否 1是）
	private Date gmtModify;					    //最后修改时间
	private Long userId;					    //用户Id
	private String openid;					    //openid
	private String unionid;					    //unionid
	private String subscribe;				    //订阅 (1 公众号  2 手机app 3小程序)
	private String appid;					    //appid
	private String ip;							//用户登录的ip地址

    public Userwechat(){

    }

    public Userwechat(Long id,Date gmtCreated,Integer delStatus,Date gmtModify) {
       this.id=id;
       this.gmtCreated=gmtCreated;
       this.delStatus=delStatus;
       this.gmtModify=gmtModify;
    }


    public Userwechat(Long id,Date gmtCreated,Integer delStatus,Date gmtModify,Long userId,String openid,String unionid,String subscribe,String appid) {
       this.id=id;
       this.gmtCreated=gmtCreated;
       this.delStatus=delStatus;
       this.gmtModify=gmtModify;
       this.userId=userId;
       this.openid=openid;
       this.unionid=unionid;
       this.subscribe=subscribe;
       this.appid=appid;
    }
    
    public Userwechat(String openid,String unionid,String subscribe,String appid,String ip) {
        this.gmtCreated=new Date();
        this.delStatus=DelStatus.NODEL;
        this.gmtModify=gmtCreated;
        this.openid=openid;
        this.unionid=unionid;
        this.subscribe=subscribe;
        this.appid=appid;
        this.ip=ip;
     }


	public void setId(Long id){
		this.id=id;
	}

	public Long getId(){
		return id;
	}

	public void setGmtCreated(Date gmtCreated){
		this.gmtCreated=gmtCreated;
	}

	public Date getGmtCreated(){
		return gmtCreated;
	}

	public void setDelStatus(Integer delStatus){
		this.delStatus=delStatus;
	}

	public Integer getDelStatus(){
		return delStatus;
	}

	public void setGmtModify(Date gmtModify){
		this.gmtModify=gmtModify;
	}

	public Date getGmtModify(){
		return gmtModify;
	}

	public void setUserId(Long userId){
		this.userId=userId;
	}

	public Long getUserId(){
		return userId;
	}

	public void setOpenid(String openid){
		this.openid=openid;
	}

	public String getOpenid(){
		return openid;
	}

	public void setUnionid(String unionid){
		this.unionid=unionid;
	}

	public String getUnionid(){
		return unionid;
	}

	public void setSubscribe(String subscribe){
		this.subscribe=subscribe;
	}

	public String getSubscribe(){
		return subscribe;
	}

	public void setAppid(String appid){
		this.appid=appid;
	}

	public String getAppid(){
		return appid;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

}
